﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LPY.LeHealth.DTO;

namespace LPY.LeHealth.DAL
{
    using ServiceStack.OrmLite;
   public class Combo_itemDAL:BaseDAL
    {
       /// <summary>
       /// 显示套餐内项目
       /// </summary>
       /// <param name="id"></param>
       /// <returns></returns>
       public List<ComboToPhysicalItemDTO> GetCombo_item(int id)
       {
           var sqlExpression = DbConnection.From<ComboToPhysicalItemDTO>()
               .LeftJoin<ComboDTO>().Where(p => p.ComboId == id);
           var rtv = DbConnection.Select(sqlExpression).ToList();
           return rtv;

       }
       /// <summary>
       /// 显示套餐类别
       /// </summary>
       /// <returns></returns>
       public List<ComboToPhysicalItemDTO> GetComboitem()
       {
           var sqlExpression = DbConnection.From<ComboToPhysicalItemDTO>();
           var rtv = DbConnection.Select(sqlExpression).ToList();
           return rtv;
       }

    }
}
